<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
</head>
<body>
    <script>
       //1.确认框 confirm("确定删除吗？");
       var b = confirm("确定删除吗？");
       if(b){
           document.write("<h1>删除成功！</h1>");
       }else{
           document.write("<h1>你取消了操作！</h1>");
       }

       //2.输入框 prompt("请输入姓名：");
       var name = prompt("请输入您的名字：");
       document.write("<h1>大名："+ name +"!</h1>");
    </script>
</body>
</html>